import { request } from "@/utils/service"
import { getToken } from "@/utils/cache/cookies"
import axios from "axios"
const baseURL = import.meta.env.VITE_BASE_API
/** 查 刷单明细 */
export function getSZHdfyApi(params: any) {
  return request({
    url: "/sz/yy/clickfarming/selectclickfarming",
    method: "get",
    params
  })
}
// 改
export function upSZHdfyApi(data: any) {
  return request({
    url: "/sz/yy/clickfarming/insertClickfarmingReviewOne",
    method: "post",
    data
  })
}
// 批量修改提交
export function updateSZHdfyApiIDS(data: any) {
  return request({
    url: "/sz/yy/clickfarming/insertClickfarmingReview",
    method: "post",
    data
  })
}
// 批量修改提交 删除
export function delDeSZHdfyApiIDS(data: any) {
  return request({
    url: "sz/yy/clickfarming/deleteClickfarmingReviewList",
    method: "post",
    data
  })
}

// 删除
export function delDeSZHdfyApi(ids: any) {
  return request({
    url: "/sz/yy/clickfarming/deleteClickfarmingReviewOne?",
    method: "delete",
    params: {
      ids
    }
  })
}
// 导出
export function downLoadTable(data: any) {
  return axios({
    url: `${baseURL}/sz/yy/clickfarming/clickfarmingExport`,
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data",
      token: getToken()
    },
    data,
    responseType: "blob"
  })
}
